import React, {useState,} from 'react'

const Collapse = props => {

    const [collapsed, setCollapsed] = useState(true)

    return <div onClick={() => setCollapsed(!collapsed)} style={props.style ? props.style : {}}>
        {props.children}
        {collapsed ? null : <>{props.content}</>}
    </div>
}

export default Collapse